﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="Nuevo.aspx.cs" Inherits="BoxScore.categoria.Nuevo" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">

<ul>
    <li>
        Categorias
        <ul>
            <li>
                <asp:LinkButton ID="LinkButton3" runat="server" Text="Agregar"></asp:LinkButton>
                <asp:ModalPopupExtender ID="LinkButton3_ModalPopupExtender" runat="server" 
                    DynamicServicePath="" Enabled="True" TargetControlID="LinkButton3" PopupControlID="Panel1"
                    CancelControlID="Button1" BackgroundCssClass="modalbg" >
                </asp:ModalPopupExtender>
            </li>
            <li>
                <asp:LinkButton ID="LinkButton4" runat="server" Text="Ver"></asp:LinkButton>
                <asp:ModalPopupExtender ID="LinkButton4_ModalPopupExtender" runat="server" 
                    DynamicServicePath="" Enabled="True" TargetControlID="LinkButton4"
                    PopupControlID="Panel3" CancelControlID="Button4" OkControlID="Button5"
                    BackgroundCssClass="modalbg"
                    >
                </asp:ModalPopupExtender>
            </li>
        </ul>
    </li>
    <li>
        Grupos
        <ul>
            <li>
                <asp:LinkButton ID="LinkButton1" runat="server" Text="Agregar"></asp:LinkButton>
            </li>
            <li>
                <asp:LinkButton ID="LinkButton2" runat="server" Text="Ver"></asp:LinkButton>
            </li>
        </ul>
    </li>
</ul>

    <asp:Panel ID="Panel1" runat="server" BorderStyle="Dashed" BackColor="White" BorderWidth="2px" HorizontalAlign="Center">
<h2>Agregar Categoria al Torneo</h2> 
 <table>
    <tr>
        <th>Descripcion</th>
        <td>
                    <asp:RequiredFieldValidator ControlToValidate="TextBox1" 
                ID="RequiredFieldValidator1" 
                runat="server" 
                ErrorMessage="* Obligatorio">
            </asp:RequiredFieldValidator>
            <br />

            <asp:TextBox ID="TextBox1" runat="server" MaxLength="255"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
        Torneo
        </td>
        <td>
            <asp:DropDownList ID="DropDownList2" runat="server" 
                DataSourceID="ObjectDataSource2" DataTextField="name" 
                DataValueField="id">
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="center"> 
            <asp:Button ID="Button1" runat="server" Text="Cancelar" 
                CausesValidation="false" onclick="Button1_Click" UseSubmitBehavior="False" />
            &nbsp;
            <asp:Button ID="Button2" runat="server" Text="Guardar" 
                onclick="Button2_Click" />
        
        </td>
    </tr>
</table> 
    
    
    </asp:Panel>


    <asp:Panel ID="Panel3" runat="server"  BorderStyle="Dashed" BackColor="White" BorderWidth="2px" HorizontalAlign="Center">
    
    <table>
        <tr>
            <td></td>
            <td align="right">
                <asp:DropDownList ID="DropDownList3" runat="server" 
                    DataSourceID="ObjectDataSource2" DataTextField="name" 
                    DataValueField="id">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            
        <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
        
            <Columns>
                <asp:TemplateField HeaderText="Categoria X Torneo">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" 
                            Text='<%# Eval("descripcion", "{0}") %>' />
                        <asp:HiddenField ID="HiddenField1" runat="server" 
                            Value='<%# Eval("id", "{0}") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        
        </asp:GridView>

            </td>
        
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="Button4" runat="server" Text="Cancelar" />
                &nbsp;
                <asp:Button ID="Button5" runat="server" Text="Guardar" />
            </td>
        </tr>
    </table>
    
    </asp:Panel>

   

<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
    SelectMethod="getTournaments" TypeName="BoxScore.Model.BoxScoreBD">
</asp:ObjectDataSource>
  
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="getCategoriasPorTorneo" TypeName="BoxScore.Model.BoxScoreBD">
    <SelectParameters>
        <asp:ControlParameter ControlID="DropDownList3" DefaultValue="0" Name="id" 
            PropertyName="SelectedValue" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

    




</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
